﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="WUCHeaderShop.ascx.cs" Inherits="NJL.Web.Controls.WUCHeaderShop" %>
<script src="/Scripts/popup_layer.js" type="text/javascript"></script>
<script type="text/javascript">
    function fChangeCity(cityId) {
        $.post('/changefocuscity.aspx', { Action: "post", CityCode: cityId }, function (data, textStatus) { window.location = window.document.URL; });
    }
</script>
    <script type="text/javascript">
        function openQQ() {
            var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/logintoqq.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "TencentLogin", "width=450,height=320,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
            sessAjax();
        }
        function openRenRen() {
            var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/renrencallback.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "RenRenLogin", "width=860,height=420,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
            sessAjax();
        }
        function openSina() {
            var A = window.open("<%=WEBSITE_USRE_DOMAIN %>/logintosina.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=openwindow", "SinaLogin", "width=650,height=420,menubar=0,scrollbars=0, status=1,titlebar=0,toolbar=0,location=1");
            sessAjax();
        }
        function sessAjax() {
            $.ajax({
                type: 'get',
                url: '/Handle/Handler.ashx',
                data: 'sessionUrl=<%=FROM_URL%>&Random=' + Math.random(),
                dataType: 'text',
                success: function (msg) {

                },
                error: function () {

                }
            })
        }
    </script>
<!--顶部-->
<div class="fullscreen" id="top">
    <div class="w1000">
        <!--topinfo-->
        <div class="topInfo">
            <%
                if (UserId!=""&&UserName!="")
                {
                  if (Session["usertype"].ToString().Equals("2"))
                  { 
            %>
            <span><a href="/AdminVisitor/Default.aspx" class="bluelink">【个人主页管理】</a></span>|<span><a
                href="/wanjia/<%=Session["userid"]%>-index.html" class="bluelink">【我的主页】</a></span>|
            <%
                  }
                  else if (Session["usertype"].ToString().Equals("3"))
                  { 
            %>
            <span><a href="/AdminVisitor/Default.aspx">【个人主页管理】</a></span>|<span>
                  <a href="/wanjia/<%=Session["userid"]%>-index.html">【我的主页】</a></span>|<span>
                  <a href="/AdminEnterprise/Default.aspx">【商铺管理】</a></span>|<span>
                  <a href="/shangpu/<%=GetCompanyIDByUserID(Session["userid"].ToString())%>-index.html">【我的商铺】</a></span>|
            <%
                  }
                }

            %>
            <span><a target="_blank" href="/xcgc/" class="icon_guangc">乡村广场</a></span>|<span>
            <a href="/" class="icon_index">网站首页</a></span>|<span>
            <a target="_blank" rel="nofllow" href="/bzzx/" class="icon_help">帮助中心</a></span>|
            <span class="collect"><a onclick="javascript:fAddFavorites()" rel="nofllow" style="cursor:pointer" class="icon_collect">收藏本站</a></span>
            <script type="text/javascript">
                function fAddFavorites() {
                    var ctrl = (navigator.userAgent.toLowerCase()).indexOf('mac') != -1 ? 'Command/Cmd' : 'Ctrl';
                    if (document.all) {
                        window.external.addFavorite(window.location, document.title);
                    }
                    else if (window.sidebar) {
                        window.sidebar.addPanel(document.title, window.location);
                    }
                    else {
                        alert('添加失败，请用Ctrl+D进行添加');
                    }
                }
            </script>
        </div>
        <!--登陆-->
        <div class="users">
            <%
                if (Session["userid"] != null)
                {
            %>
            <p>
                您好，<strong><%=Session["username"]%></strong>！&nbsp;&nbsp;<a href="/Logout.aspx?url=<%= Request.RawUrl %>">[退出]</a>
                <%
                    if (Session["usertype"].ToString() == "-1")
                    {
                %>
                &nbsp;&nbsp;为什么看不到我的个人管理呢？<a href="/RegisterActive.aspx">激活账户</a>
                <% 
                    }
                    if (Session["usertype"].ToString() == "0")
                    {
                %>
                &nbsp;&nbsp;为什么看不到我的个人管理呢？<a href="/RegisterTow.aspx">完成注册</a>
                <% 
                    }
                %>
            </p>
            <%
                }
            else
            { 
            %>
            <p>
                您好，欢迎来农家乐网！请&nbsp;<a rel="nofllow" id="aTopLogin" style="cursor:pointer" class="bluelink">登录</a>&nbsp;&nbsp;
                <span class="qq"><a id="aTopLoginQQ" style="cursor:pointer" class="qqtop bluelink"></a></span>
                <span class="qq"><a id="aTopLoginSina" style="cursor:pointer" class="sinatop bluelink"></a></span>
                <span class="qq"><a id="aTopLoginRenren" style="cursor:pointer" class="renrentop bluelink"></a></span>
                <span><a rel="nofllow" target="_blank" href="/Register.aspx" class="bluelink">免费注册</a></span>
                <span><a rel="nofllow" target="_blank" href="/FindPassword.aspx" class="bluelink">找回密码</a></span>
            <%
                }
            %>
        </div>
    </div>
</div>
    <script type="text/javascript">
        var openDivLogin;
        $(document).ready(function () {
            openDivLogin = new PopupLayer({ trigger: "#aTopLogin", popupBlk: "#blkTopLogin", closeBtn: "#aTopLoginClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLogin.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLogin").src = '<%=WEBSITE_USRE_DOMAIN %>/SecondLogin.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLogin" class="blk">
        <div class="popup_title">
            <span class="float_r"><a href="javascript:void(0)" id="aTopLoginClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a> </li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLogin" name="main" width="500" height="420" style="overflow: hidden;
                border: none;" frameborder="no"></iframe>
        </div>
    </div>

    <!--QQ LOGIN-->
    <script type="text/javascript">
        var openDivLoginQQ;
        $(document).ready(function () {
            openDivLoginQQ = new PopupLayer({ trigger: "#aTopLoginQQ", popupBlk: "#blkTopLoginQQ", closeBtn: "#aTopLoginQQClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginQQ.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginQQ").src = '<%=WEBSITE_USRE_DOMAIN %>/logintoqq.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginQQ" class="blk" style="width:585px;height:560px">
        <div class="popup_title" style="width:585px">
            <span class="float_r"><a href="javascript:void(0)" id="aTopLoginQQClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与腾讯合作，支持QQ号码直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginQQ" name="main" width="550" height="520" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>
    <!--SINA LOGIN-->
    <script type="text/javascript">
        var openDivLoginSina;
        $(document).ready(function () {
            openDivLoginSina = new PopupLayer({ trigger: "#aTopLoginSina", popupBlk: "#blkTopLoginSina", closeBtn: "#aTopLoginSinaClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginSina.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginSina").src = '<%=WEBSITE_USRE_DOMAIN %>/logintosina.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginSina" class="blk" style="width:575px;height:420px">
        <div class="popup_title" style="width:575px;">
            <span class="float_r"><a href="javascript:void(0)" id="aTopLoginSinaClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与新浪微博合作，支持新浪微博帐号直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginSina" name="main" width="570" height="370" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>
    <!--RENREN LOGIN-->
    <script type="text/javascript">
        var openDivLoginRenren;
        $(document).ready(function () {
            openDivLoginRenren = new PopupLayer({ trigger: "#aTopLoginRenren", popupBlk: "#blkTopLoginRenren", closeBtn: "#aTopLoginRenrenClose", useOverlay: true, useFx: true,
                offsets: {
                    x: 0,
                    y: -41
                }
            });
            openDivLoginRenren.doEffects = function (way) {
                if (way == "open") {
                    this.popupLayer.css({ opacity: 0.3 }).show(400, function () {
                        this.popupLayer.animate({
                            left: ($(document).width() - this.popupLayer.width()) / 2,
                            top: (document.documentElement.clientHeight - this.popupLayer.height()) / 2 + $(document).scrollTop(),
                            opacity: 0.8
                        }, 1000, function () { this.popupLayer.css("opacity", 1) } .binding(this));
                    } .binding(this));
                    document.getElementById("iFrameTopLoginRenren").src = '<%=WEBSITE_USRE_DOMAIN %>/renrencallback.aspx?websitecode=<%=WEBSITE_CODE %>&domain=<%=WEBSITE_DOMAIN %>&url=<%=FROM_URL %>&logintype=opendiv';
                }
                else {
                    this.popupLayer.animate({
                        left: this.trigger.offset().left,
                        top: this.trigger.offset().top,
                        opacity: 0.1
                    }, { duration: 500, complete: function () { this.popupLayer.css("opacity", 1); this.popupLayer.hide() } .binding(this) });
                }
            }
        }
      );
    </script>
    <div id="blkTopLoginRenren" class="blk" style="width:585px;height:400px">
        <div class="popup_title" style="width:585px;">
            <span class="float_r"><a href="javascript:void(0)" id="aTopLoginRenrenClose">关闭</a></span>
            <ul>
                <li class="now"><a target="main">登录</a></li>
                <li><strong class="green font14">乡村旅游第一网已与人人网合作，支持人人帐号直接登录。</strong></li>
            </ul>
        </div>
        <div>
            <iframe id="iFrameTopLoginRenren" name="main" width="580" height="370" style="overflow: hidden; border: none;" frameborder="no"></iframe>
        </div>
    </div>

<div class="header">
    <div class="headerinfo">
        <!--logo-->
        <div class="logo">
            <a href="/" title="<%=WEBSITE_NAME %>"><img src="<%=WEBSITE_IMAGE_DOMAIN %>/Images/logo/<%=WEBSITE_CODE %>/logo_shop.png" alt="<%=WEBSITE_NAME %>" /></a>
        </div>
    </div>
</div> 
